import {userType} from "../models/user";

let currentUser: userType;
let chatUser: userType;

const setCurrentUserState = (user: userType) => {
    currentUser = user;
}

const getCurrentUserState = () : userType => {
    return currentUser;
}

const clearCurrentUserState = () => {
    setCurrentUserState(null);
}

const setChatUserState = (user: userType) => {
    chatUser = user
}

const getChatUserState = () : userType => {
    return chatUser;
}

export {
    setCurrentUserState,
    getCurrentUserState,
    clearCurrentUserState,
    setChatUserState,
    getChatUserState,
}